<template>
  <div class="banner-wrapper">
    <div class="top-cont" :style="{ backgroundColor: bannerBgColorRef }">
      <div class="banner">
        <var-swipe class="swipe-example">
          <var-swipe-item>
            <img
              class="swipe-example-image"
              src="../../assets/imgs/banner/01.png"
            />
          </var-swipe-item>
          <var-swipe-item>
            <img
              class="swipe-example-image"
              src="../../assets/imgs/banner/02.png"
            />
          </var-swipe-item>
          <var-swipe-item>
            <img
              class="swipe-example-image"
              src="../../assets/imgs/banner/03.png"
            />
          </var-swipe-item>
        </var-swipe>
      </div>
    </div>
    <div class="event-box">
      <div class="event-item">
        <svg-icon class="svg-icon" iconName="icon-shuqian1" />
        <p>书签</p>
      </div>
      <div class="event-item">
        <svg-icon class="svg-icon" iconName="icon-shuqian2" />
        <p>便签</p>
      </div>
    </div>
  </div>
</template>
<script setup name="Banner">
import { ref } from 'vue';
import Search from '../../components/Search.vue';

const bannerBgColorRef = ref('');
</script>
<style scoped lang="less">
.banner-wrapper {
  background-color: #fff;
  .top-cont {
    padding: .5rem .5rem 0.9rem .5rem;
    background-color: var(--system-primary-color);
    backdrop-filter: brightness(1.9);
    .banner {
      width: 100%;
      height: 11rem;
      border-radius: 0.8rem;
      overflow: hidden;
      margin-bottom: -3rem;
      -webkit-transform: rotate(0deg);
    }
  }
  .event-box {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-column-gap: 1rem;
    padding: 0 1rem;
    .event-item {
      margin-bottom: 1rem;
      margin-top: 3.4rem;
      text-align: center;
      display: flex;
      align-items: center;
      justify-content: center;
      .svg-icon {
        width: 1.8rem;
        height: 1.8rem;
      }
      p {
        margin: 0;
        padding: 0;
        font-size: 0.92rem;
        margin-left: .3rem;
        color: #444;
        font-weight: 500;
      }
    }
  }
}
.swipe-example {
  height: 11rem;
}

.swipe-example-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
</style>
